package com.java1412.mapper;

import com.java1412.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author java1412
 * @since 2023-06-20 16:42:01
 */
public interface UserMapper {

    /**
     * 根据id查询
     *
     * @param id
     * @return
     */
    public User findById(@Param("id") Integer id);

    public User findByUsername(@Param("username") String username);

    // 添加新用户
    Integer add(User user);

    // 查询用户数据
    List<User> find(Map<String, Object> map);

    // 查询用户的数量
    public Integer findCount(Map<String, Object> map);
}
